﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using CanDoo.Core.Data;
using CanDoo.Data;
using CanDoo.Admin.Core.Models;

namespace CanDoo.Oil.Core.Models
{
    /// <summary>
    /// 实体类——供应商联系人
    /// </summary>
    [Serializable]
    [Description("供应商联系人")]
    public class SupplierContacts :  EntityBase,ICreatedTime, IAudited
    {
        /// <summary>
        ///供应商
        /// </summary>
        [Display(Name = "供应商")]
        public virtual Supplier Supplier { get; set; }
        /// <summary>
        ///供应商外键
        /// </summary>
        [Display(Name = "供应商外键")]
        public long SupplierId { get; set; }

        /// <summary>
        ///姓名
        /// </summary>
        [Display(Name = "姓名")]
        [Required, StringLength(50)]
        public override string Name { get; set; }

        /// <summary>
        ///性别
        /// </summary>
        [Display(Name = "性别")]
        [Required]
        public int Sex { get; set; }

        /// <summary>
        ///手机号
        /// </summary>
        [Display(Name = "手机号")]
        [StringLength(50)]
        public string Mobile { get; set; }

        /// <summary>
        ///电话
        /// </summary>
        [Display(Name = "电话")]
        [StringLength(50)]
        public string Tel { get; set; }

        /// <summary>
        ///职务
        /// </summary>
        [Display(Name = "职务")]
        [StringLength(50)]
        public string Title { get; set; }

        /// <summary>
        ///传真
        /// </summary>
        [Display(Name = "传真")]
        [StringLength(50)]
        public string Fax { get; set; }

        /// <summary>
        ///Email
        /// </summary>
        [Display(Name = "Email")]
        [StringLength(50)]
        public string Email { get; set; }

        /// <summary>
        ///邮编
        /// </summary>
        [Display(Name = "邮编")]
        [StringLength(50)]
        public string Zip { get; set; }

        /// <summary>
        ///通讯地址
        /// </summary>
        [Display(Name = "通讯地址")]
        [StringLength(200)]
        public string Address { get; set; }

        
        #region Implementation of ICreatedTime

        /// <summary>
        /// 获取设置 信息创建时间
        /// </summary>
        [Display(Name = "创建时间")]
        public DateTime CreatedTime { get; set; }
        #endregion

        #region Implementation of ICreatedAudited

        /// <summary>
        /// 获取或设置 创建者编号
        /// </summary>
        [Display(Name = "创建人")]
        public string CreatorUserId { get; set; }

        #endregion

        #region Implementation of IUpdateAutited

        /// <summary>
        /// 获取或设置 最后更新时间
        /// </summary>
        [Display(Name = "最后更新时间")]
        public DateTime? LastUpdatedTime { get; set; }

        /// <summary>
        /// 获取或设置 最后更新者编号
        /// </summary>
        [Display(Name = "最后更新用户")]
        public string LastUpdatorUserId { get; set; }

        #endregion
    }
}
